﻿<div id="list" />
@section footer{
    <script type="text/javascript">
        var columns = [
              { hide: true, display: '记录编号', name: 'Id' }
            , { display: '开始日期', name: 'Fromdate', align: 'left', width: 180, minWidth: 60 }
            , { display: '结束日期', name: 'Todate', align: 'left', width: 141, minWidth: 60 }
            , { display: '备注', name: 'Remark', align: 'left', width: 141, minWidth: 60 }
            , { display: '状态', name: 'Status', align: 'left', width: 141, minWidth: 60 }
        ];
        var toolbaritems = [
              { id: "C", text: '生成账单', click: toolbarclick, img: '@Url.Content("~/Content/icons/silkicons/add.png")' }
            , { line: true }
            , { id: "D", text: '回退账单', click: toolbarclick, img: '@Url.Content("~/Content/icons/silkicons/detail.png")' }
            , { line: true }
            , { id: "E", text: '导出账单', click: toolbarclick, img: '@Url.Content("~/Content/icons/silkicons/edit.png")' }
        ];
        
        function toolbarclick(item) {
            var width = 800;
            var height = 400;
            switch (item.id) {
                case "C":
                    break;
                case "R":
                    break;
                case "E":
                    break;
            }
        }

        $(function () {
            grid = $("#list").ligerGrid({
                url: '@Url.Action("GetGrid")', columns: columns, dataAction: 'server', pageSize: 20, sortName: 'Id', sortOrder: 'asc',
                rownumbers: true, width: '98%', height: '100%', heightDiff: -10, checkbox: false, toolbar: {}
            });
            if (grid.toolbarManager)
                grid.toolbarManager.set("items", toolbaritems);
        });
        
    </script>
}
